/***    
request.globalRequest(url,请求方式,obj数据,123,true单,true 多array)url, method, data, power, isUpload, isFiles
1===没登录前的请求头
2===携带请求头token
3===刷新token
***/
import request from '@/util/network_request/request.ts'
const apiUser = {}
//  检查是否已绑定手机号
apiUser.checkPhone = (data) => request.globalRequest({
	url: `/mobile/network/account/checkBindingPhone`,
	method: 'GET',
	data,
	power: 2
})
//  绑定或换绑手机号
apiUser.bindingPhone = (data) => request.globalRequest({
	url: `/mobile/network/account/bindingPhone`,
	method: 'PUT',
	data,
	power: 2
})
// 获取当前客户登录信息
apiUser.getUerDetail = () => request.globalRequest({
	url: `/mobile/network/account/getAccountInfo`,
	method: 'GET',
	power: 2
})
// 修改密码
apiUser.updatePwd = (data) => request.globalRequest({
	url: `/mobile/network/account/updatePwd`,
	method: 'PUT',
	data,
	power: 2
})
// 编辑个人资料
apiUser.updateUserInfo = (data) => request.globalRequest({
	url: `/mobile/network/account/updateNetworkEmpInfo`,
	method: 'PUT',
	data,
	power: 2
})
// 上传头像
apiUser.uploadAvatar = (data) => request.globalRequest({
	url: `/mobile/file/annex/avatarUpload`,
	method: 'POST',
	data,
	power: 2,
	isUpload: true,
	isFiles: false
})
// 新增修改地址
apiUser.saveUserContactAddress = (data) => request.globalRequest({
	url: `/mobile/user/saveUserContactAddress`,
	method: 'POST',
	data,
	power: 2
})

//根据服务商编码选择服务商
apiUser.getNetwork = (data) => request.globalRequest({
	url: `/mobile/network/account/getNetwork`,
	method: 'GET',
	data,
	power: 2
})
//获取账号所属服务商信息
apiUser.getNetworkInfo = (data) => request.globalRequest({
	url: `/mobile/network/account/getNetworkInfo`,
	method: 'GET',
	data,
	power: 2
})
// 注销账号
apiUser.cancelAccount = () => request.globalRequest({
	url: `/mobile/network/account/cancelAccount`,
	method: 'get',
	power: 2
})
export default apiUser